import { connect } from 'react-redux';
import Counter from '../components/counter';
import { IncreaseAction, DecreaseAction } from '../actions';

function mapStateToProps(state) {
  return {
    value: state.count
  };
}

function mapDispatchToProps(dispatch) {
  return {
    onIncreaseClick: () => dispatch(IncreaseAction),
    onDecreaseClick: () => dispatch(DecreaseAction)
  };
}

const CounterBox = connect(
  mapStateToProps,
  mapDispatchToProps
)(Counter);

export default CounterBox;
